<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="file" multiple id="file">
    <script>
        const onChange = ({ target: { files } }) => {
            const body = new FormData();
            for (let i = 0; i < files.length; i++) {
                body.append("files", files[i]);
            }
            fetch("/files2xlsx/upload", {
                method: "post",
                body
            })
                .then(e => {
                    console.log(e)
                    return e.text()
                })
                .then(e => {
                    window.open(`/files2xlsx/${e}/download`)
                })
        }
        document.getElementById("file").onchange = onChange
    </script>
</body>

</html>